package com.cinema;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

public class Test {

	/**
	 * @param args
	 * @throws ParseException 
	 */
	public static void main(String[] args) throws ParseException {
		List<Date> date = new ArrayList<Date>();
		SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
		Calendar c = Calendar.getInstance();
		
		c.setTime(formatter.parse("24/12/2011"));
		
		System.out.println(c.get(Calendar.YEAR) + "\n" +  c.get(Calendar.MONDAY) + "\n" + c.get(Calendar.DATE));
		date.add(formatter.parse("24/12/2011"));
		date.add(formatter.parse("26/12/2011"));
		
		Date d1 = formatter.parse("28/12/2011");
		Date d2 = new Date();
		if(d1.after(d2))
		for(int i = 0; i < date.size(); i++)
			System.out.println(date.get(i));
	}

}
